package com.example.jdbcsamples.entity;

/**
 * 
 * @author Bora SAYINER
 * @since Feb 1, 2015 1:34:29 PM
 * @version 1.0.0
 */
public class Department {

	private int number;
	private String name;

	public int getNumber() {
		return number;
	}

	public void setNumber(int number) {
		this.number = number;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + number;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) return true;
		if (obj == null) return false;
		if (getClass() != obj.getClass()) return false;
		Department other = (Department) obj;
		if (number != other.number) return false;
		return true;
	}

	@Override
	public String toString() {
		return "Department [number=" + number + ", name=" + name + "]";
	}

}
